Original author(s) | Hilaire Fernandes |
---|---|
Initial release | December 31, 1996 |
Stable release | 10.12 / November 20, 2010 |
Development status | Active |
Written in | Pharo |
Operating system | Linux, Mac OS X, Windows |
Type | Interactive geometry software |
License | GPL |
Website | www.ofset.org/drgeo |
DrGeo is a free (under GNU GPL license) software, created by Hilaire Fernandes for the Ofset. As its names suggests, it is a geometry software. It runs over GTK+ interface.
Contents |
DrGeo has two kinds of points: A free one, which can be moved with the mouse (but may be attached to a curve), and a point given by its coordinates.
There is also the intersection of 2 curves and the midpoint of a segment.
DrGeo is equipped with the classic line, ray, segment and vector.
There are also the circle (defined by 2 points) but also the less classic arc by three points. DrGeo can also construct polygons (given by points) and loci.
Besides the parallel and perpendicular line through a point, DrGeo can apply to a point one of these transformations:
When some objects, called final depend from other objects, called initial it is possible to create a new transformation sending the initial objects to the final ones. This is a macro. It allows to add new objects to DrGeo like regular polygons or new transformations like circle inversion.
DrGeo comes up with a script language, which is Scheme (a Lisp-like language).
It is possible also to create a Guile object, which is a number, but created with a script, written in the Scheme syntax. It can have one or several variables, which are chosen at the creation of the object, with mouse clicks. The names of the variables are a1, a2 etc. For example, if one wants the square of a number a1, the script
creates a numeric object, whose value is the square of the first number. If now the first number is changed, the second one changes too.
If now one wants to implement the square of a complex number, one has to create 2 numeric values, one for the real part, and the other one for the imaginary part. As , the script for the real part is (once one has selected a free point)
and the script for the imaginary part (with the same point selected):
getCoordinates a1 yields a list because a1 is a point, which has 2 coordinates. The CAR of this list is the first coordinate, which is the abscissa, and the CADR of the list (the CAR of the CDR) is the second coordinate.
Once this is done, it remains only to create a point which coordinates are the two numbers created by scripts, and a transformation is defined; it implements the function and can be transformed into a macro.
The Guile object can only create one number, then if one wants to create a complex figure by a script, one has to write the script with a text editor, save it with the scm file extension, then make DrGeo evaluate the file.
Here is how DrGeo can create a Sierpinski triangle recursively:
"Sierpinski""""""""""""""A""B""C"